﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="form_nghiphep.aspx.cs" Inherits="form_nghiphep2" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="ajaxtoolkit" %>
<%@ Register Assembly="DevExpress.Web.ASPxGridView.v10.1, Version=10.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxGridView" TagPrefix="dx" %>

<%@ Register assembly="DevExpress.Web.v10.1, Version=10.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxPopupControl" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.ASPxEditors.v10.1, Version=10.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxEditors" tagprefix="dx" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Form nghi phep</title>
    <link href="../styles/style.css" rel="stylesheet" type="text/css" /> 
    <link type="text/css" href="../css/smoothness/jquery-ui-1.8.11.custom.css" rel="stylesheet" />
     <link type="text/css" href="../css/validationEngine.jquery.css" rel="stylesheet" />
    <script src="../js/jquery-1.5.min.js" type="text/javascript"></script>
    <script src="../js/jquery-ui-1.8.9.custom.min.js" type="text/javascript"></script>
    <script src="../js/jquery.validationEngine.js" type="text/javascript"></script>
     <script type="text/javascript">
        $(function() {
        $("input[id$=txtFromDate]").datepicker({
                yearRange: "+0:+0",
                dateFormat: 'dd/mm/yy',
                changeMonth: true,
                changeYear: false
            });

            $("input[id$=txtToDate]").datepicker({
            yearRange: "+0:+0",
            changeMonth: true,
            dateFormat: 'dd/mm/yy',
            changeYear: false
            });
        });

       
    </script>
    <style type="text/css">
       
    </style>
</head>
<body>
       <form id="form1" runat="server">

    <div class="wrapper">
         <div id="header">
		<h1 class="logo">
        <a href="index.aspx">
        	<img src="../images/logo.png" width="280" height="46" border="0" /></a>
        
        </h1>
         <div class="login_zone" >
                Username:<asp:Literal ID="lUsername" Text="" runat="server" />
                <br />
                 <asp:LinkButton ID="lnkLogout" runat="server" Text="Logout" 
                    onclick="lnkLogout_Click" /> | <a href="../nghiphep/users/change_pass.aspx">Change password</a>
        </div>
        </div>


<div id="nav">
      <div style="margin-bottom:20px;width:300px;float:left;">
              <ul class="breadcrumb">
        <li>
            <a href="index.aspx" title="Home">
         
                 <img src="../images/home.png" width="24" height="23" border="0" align="left" style="margin-top:2px;" class="home" />
      
            </a>
              
            </li>
            <li>
            <a href="index.aspx"   title="homepage">
                Homepage
                </a>
            </li>
        <li>
            
               Đăng ký nghỉ phép
            
       </li>
      
     </ul>
     </div>
        </div>
    <div class="main_content2">
       <div style="margin-top:-8px;">
             <img src="../images/nghiphep_header.png" width="900" height="77" />
           </div>
           <br />
           <div id="info_nghi_phep_left">
               <img src="../images/bullet.png" width="8" height="9" border="0" /> Họ tên: <asp:Literal ID="lFullName" runat="server"></asp:Literal>
                 &nbsp;&nbsp;
               <br />
               <img src="../images/bullet.png" width="8" height="9" border="0" /> Phòng ban:  
                               
                    <asp:Literal ID="lPhongBan" runat="server"></asp:Literal>
                    <br />
                    <img src="../images/bullet.png" width="8" height="9" border="0" /> Số ngày nghỉ đã sử dụng:<div>
                    <ul>
                        <li>
                            Phép năm:
                            <asp:Label ID="lPhepNamDaSuDung" runat="server"></asp:Label>
                            /
                    <asp:Label ID="lTongSoPhepNam" runat="server"></asp:Label>
                        &nbsp;ngày</li>
                        <li>
                            Phép đặc biệt:
                            <asp:Label ID="lNghiDacBiet" runat="server" Text=""></asp:Label>
                        </li>
                        <li>
                            Nghỉ ốm:
                            <asp:Label ID="lNghiOm" runat="server" Text=""></asp:Label>
                        </li>
                        <li>
                            Nghỉ không hưởng lương:
                            <asp:Label ID="lNghiKhongHuongLuong" runat="server" Text=""></asp:Label>
                        </li>
                    </ul>
                </div>
                        
                
    
        <ajaxtoolkit:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
        </ajaxtoolkit:ToolkitScriptManager>
       
    
           </div>
           <div id="info_nghiphep_right">
            
                 <table id="table_nghi_phep">
            <tr  >
              <td  align="left" valign="bottom" style="padding-top:10px;padding-bottom:10px" 
                    class="style2">
                    Loại phép:</td>
               
               <td align="left" style="height:24px;padding-top:10px;padding-bottom:10px" 
                    colspan="2">
               
                     <dx:ASPxComboBox ID="cbLoaiPhep" runat="server" Height="24px" Width="180px" >
                     </dx:ASPxComboBox>
       
            </td>
                </tr>
            <tr>
              <td  align="left" height="42" class="style3" >
                    Nghỉ từ ngày:</td>
               
               <td align="left" colspan="2">
                   <div style="width:140px; float:left;">
                    <asp:TextBox ID="txtFromDate" runat="server" CssClass="box2" TabIndex="1" 
                        Width="80px"></asp:TextBox>
                   </div>
                     <div style="width:100px; float:left;padding-top:12px;">
                        đến ngày:
                         
                     </div>
                     <div style="float:left;width:140px; text-align:left;">
                    <asp:TextBox ID="txtToDate" runat="server" CssClass="box2" TabIndex="1" 
                        Width="80px"></asp:TextBox>
                    
                        </div>
                        
            </td>
               
                </tr>
            <tr>
              <td  align="left" height="42" >
                    Thời gian nghỉ:</td>
               
               <td align="left" class="style4">
               
                   <dx:ASPxComboBox ID="cbThoiGianNghi" runat="server" Height="24px" 
                       Width="180px" >
                     </dx:ASPxComboBox>
                        
                </td>
               
               <td align="left" class="style1">
               
                   <i>&nbsp;Ví dụ: nghỉ buổi sáng, nghỉ buổi chiều...</i></td>
               
                </tr>
            <tr>
              <td align="left" valign="bottom" style="padding-top:10px;padding-bottom:10px" 
                    class="style2">
                    Lý do:</td>
               
               <td colspan="2">
               
                <asp:TextBox ID="txtLydo" runat="server" class="box2" Width="400px" />
                </td>
                </tr>
            <tr>
              <td align="left" valign="bottom" class="style5" colspan="3">
               
                  
                &nbsp;(chỉ nhập khi đăng ký nghỉ ốm, nghỉ không hưởng lương, nghỉ 
                   phép đặc biệt)</td>
               
                </tr>
            <tr>
              <td align="left" valign="bottom" class="style3">
                    &nbsp;</td>
               
               <td align="left" colspan="2">
               
                  
                     &nbsp;</td>
                </tr>
            <tr>
              <td align="left" valign="bottom" class="style3">
                    &nbsp;</td>
               
               <td align="left" colspan="2">
               
                  
                     <div style="margin:0 auto;">
                  
                 <asp:Button ID="btnSumit" runat="server" CssClass="button white" Text="Đăng ký" 
                       Width="80px" onclick="btnSumit_Click" />
               
                   <asp:Button ID="btnNghiPhepCu" runat="server" CssClass="button white" Text="Theo dõi nghỉ phép" 
                       Width="140px" onclick="btnNghiPhepCu_Click"  />
              
        </div></td>
                </tr>
            </table>
           </div>
          <div class="clear"></div>
      
        <br />
        <br />
        <div id="info_nghi_phep_left2">
            
               <img src="images/bullet.png" width="8" height="9" border="0" /> Danh  sách nghỉ phép
        </div>
        <br />
        <br />
        <div align="center">
        
            <dx:ASPxGridView ID="gdNghiPhep" runat="server" AutoGenerateColumns="False" 
                   Width="880px" 
                   ClientInstanceName="gridNghiPhep" 
                onhtmlrowcreated="gdNghiPhep_HtmlRowCreated">
                   <TotalSummary>
                       <dx:ASPxSummaryItem DisplayFormat="Total: {0}" FieldName="songaynghi" SummaryType="Sum" />
                   </TotalSummary>
                   <Columns>
                       <dx:GridViewCommandColumn Caption="Operators" ShowSelectCheckbox="false" 
                           VisibleIndex="0" Visible="False">
                             <CustomButtons>                             
                                
                                <dx:GridViewCommandColumnCustomButton ID="btnEdit" Text="Edit"  ></dx:GridViewCommandColumnCustomButton>
                                
                                
                                
                                <dx:GridViewCommandColumnCustomButton ID="btnDelete" Text="Delete"></dx:GridViewCommandColumnCustomButton>
                                
                            
                            </CustomButtons>
                       </dx:GridViewCommandColumn>
                       <dx:GridViewDataTextColumn VisibleIndex="1" FieldName="dv" Caption="Trưởng phòng" 
                           Width="90px">
                        
                        
                       </dx:GridViewDataTextColumn>
                       <dx:GridViewDataTextColumn VisibleIndex="2" FieldName="ns" Caption="Nhân sự" 
                           Width="70px">
                        
                        
                       </dx:GridViewDataTextColumn>
                       <dx:GridViewDataTextColumn VisibleIndex="3" FieldName="gd" Caption="Giám đốc" 
                           Width="70px" Visible="False">
                        
                        
                       </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn Caption="ID" VisibleIndex="4" FieldName="id" 
                           Visible="false">
                        </dx:GridViewDataTextColumn>
                       <dx:GridViewDataTextColumn Caption="Nghỉ từ ngày" VisibleIndex="5" 
                           FieldName="nghipheptungay" Width="84px">
                            <PropertiesTextEdit DisplayFormatString="dd-MM-yyyy">
                           </PropertiesTextEdit>
                           
                       </dx:GridViewDataTextColumn>
                       <dx:GridViewDataTextColumn Caption="Nghỉ đến ngày" VisibleIndex="6" 
                           FieldName="nghiphepdenngay" Width="90px">
                       <PropertiesTextEdit DisplayFormatString="dd-MM-yyyy"></PropertiesTextEdit>
                           <PropertiesTextEdit DisplayFormatString="dd-MM-yyyy">
                           </PropertiesTextEdit>
                       </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn Caption="Số ngày nghỉ" VisibleIndex="7" FieldName="songaynghi">
                            </dx:GridViewDataTextColumn>
                       <dx:GridViewDataTextColumn Caption="Thời gian nghỉ" VisibleIndex="8" 
                           FieldName="thoigiannghi" Width="120px">
                        
                           <CellStyle HorizontalAlign="Left">
                           </CellStyle>
                        
                       </dx:GridViewDataTextColumn>
                       <dx:GridViewDataTextColumn Caption="Loại phép" VisibleIndex="9" 
                           FieldName="loaiphep" Width="140px">
                           <CellStyle HorizontalAlign="Left">
                           </CellStyle>
                       </dx:GridViewDataTextColumn>
                       <dx:GridViewDataTextColumn Caption="Ngày đăng ký" VisibleIndex="10" 
                           FieldName="ngaydangky" Width="110px">
                         <PropertiesTextEdit DisplayFormatString="dd-MM-yyyy"></PropertiesTextEdit>
                           <Settings AllowSort="True" />
                       </dx:GridViewDataTextColumn>
                       <dx:GridViewDataTextColumn Caption="Lý do nghỉ" VisibleIndex="11" Width="200px" 
                           FieldName="lydo">
                            
                           <CellStyle HorizontalAlign="Left">
                           </CellStyle>
                            
                       </dx:GridViewDataTextColumn>
                   </Columns>
                    
                   <Settings ShowHorizontalScrollBar="True" ShowFooter="True" />
                    
               </dx:ASPxGridView>   
        
        </div>
        
        <div>
             

            <dx:ASPxPopupControl ID="msgBox" 
            runat="server"
            PopupHorizontalAlign="WindowCenter"
                 PopupVerticalAlign="WindowCenter" 
                 Height="119px" Width="380px" HeaderText="Info"
            >
                <ContentCollection>
<dx:PopupControlContentControl runat="server">
    <table style="width:100%;">
        <tr>
            <td>
                      <div style="float:left;margin-left:10px;width:34px;">
                 <img alt="" src="../images/msgbox_icon.png" />
                </div>
                 <div style="float:left;margin-left:10px;height:24px; margin-top:10px; font-size:12px;">
                 <dx:ASPxLabel ID="lMessage" 
                     runat="server">
                 </dx:ASPxLabel>
                 </div></td>
        </tr>
        <tr>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td>
                 <asp:Button ID="btnOK" runat="server" CssClass="button white" Font-Size="9pt" 
                       Text="OK" Width="63px" OnClick="btnOK_Click" /> </td>
        </tr>
    </table>
                    </dx:PopupControlContentControl>
</ContentCollection>
                <HeaderStyle HorizontalAlign="Left" />
            </dx:ASPxPopupControl>
        </div>
        
    
     </div>
     
</div>     
     </form>
</body>
</html>
